package com.woniuxy.entitys;

import java.io.Serializable;
import java.util.Date;

/**
 * illness
 * @author 
 */
public class Illness implements Serializable {
    private Integer id;

    private Integer oid;

    private String type;

    private String drug;

    private Date illnessTime;

    private String beiyong;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getOid() {
        return oid;
    }

    public void setOid(Integer oid) {
        this.oid = oid;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDrug() {
        return drug;
    }

    public void setDrug(String drug) {
        this.drug = drug;
    }

    public Date getIllnessTime() {
        return illnessTime;
    }

    public void setIllnessTime(Date illnessTime) {
        this.illnessTime = illnessTime;
    }

    public String getBeiyong() {
        return beiyong;
    }

    public void setBeiyong(String beiyong) {
        this.beiyong = beiyong;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Illness other = (Illness) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOid() == null ? other.getOid() == null : this.getOid().equals(other.getOid()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getDrug() == null ? other.getDrug() == null : this.getDrug().equals(other.getDrug()))
            && (this.getIllnessTime() == null ? other.getIllnessTime() == null : this.getIllnessTime().equals(other.getIllnessTime()))
            && (this.getBeiyong() == null ? other.getBeiyong() == null : this.getBeiyong().equals(other.getBeiyong()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOid() == null) ? 0 : getOid().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getDrug() == null) ? 0 : getDrug().hashCode());
        result = prime * result + ((getIllnessTime() == null) ? 0 : getIllnessTime().hashCode());
        result = prime * result + ((getBeiyong() == null) ? 0 : getBeiyong().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", oid=").append(oid);
        sb.append(", type=").append(type);
        sb.append(", drug=").append(drug);
        sb.append(", illnessTime=").append(illnessTime);
        sb.append(", beiyong=").append(beiyong);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}